{extend name="public:member" /}
{block name="content"}
<div class="page-header">
	<h1>
		{$breadcrumb1}
		<small>
			<i class="ace-icon fa fa-angle-double-right"></i>
			{$breadcrumb2}
		</small>
	
	</h1>
</div>
<div class="row">
	<div class="col-xs-12">	
		<div class="form-horizontal">	
		
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-left">头像 </label>
			<div class="col-sm-10">
				 <div id="thumb">
		                  <a href="#" id="thumb-icon" data-toggle="image" class="img-thumbnail">
		                  	{if condition="$user['userpic']"}
		                  		<img src="IMG_ROOT{$user.userpic|resize=100,100}" />
		                  	{else /}
		                  		<img src="__PUBLIC__/image/no_image_100x100.jpg" />
		                  	{/if}
						  </a>
		                  <input type="hidden" name="userpic" value="{$user.userpic|default=''}" id="input-image" />
		            </div>
			</div>
			</div>
			
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-left">  昵称 </label>
			<div class="col-sm-5">
				<div class="clearfix">
					<input name="nickname" class="col-xs-10 col-sm-10 form-control"  value="{$user.nickname|default=''}" type="text">
				</div>
			</div>
			</div>
			
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-left">  邮箱 </label>
			<div class="col-sm-5">
				<div class="clearfix">
					<input name="email" class="col-xs-10 col-sm-10 form-control"  value="{$user.email|default=''}" type="text">
				</div>
			</div>
			</div>
			
	
			
		</div>
		<div class="form-group">
			<label class="col-sm-1 control-label no-padding-left"> </label>	
			<div class="col-sm-11">
				<button form="form" type="submit" id="send"  class="btn btn-sm btn-primary">提交</button>		
			</div>
		</div>
	</div>
</div>
{/block}
{block name="javascript"}
<script>

$('#send').click(function(){
	$.post(
		"{:url('/member')}",
		$('input[type=\'text\'],input[type=\'hidden\'],input[type=\'password\']'),
		function(d){
			art.dialog({
					content:d.success,
					lock: true,
					ok: function () {}				    
			});	
		}
	);
});
</script>	
{/block}